package com.company.观察者模式2;

import java.util.Observable;
import java.util.Observer;

public class Customer implements Observer {
    @Override
    public void update(Observable o, Object arg) {
        int var=(Integer)arg;
        if (var>0){
            System.out.println("涨价了");
        }else if (var<0){
            System.out.println("倒闭款");
        }
    }
}
